package br.com.channelll.server.rpc.bo;

import br.com.channelll.client.bean.LoginRequestBean;
import br.com.channelll.client.bean.LoginResponseBean;

import com.google.gwt.user.client.rpc.IsSerializable;


public class IncluiLoginBO implements BusinnesObject {

	@Override
	public IsSerializable execute(IsSerializable requestBean) {
		LoginRequestBean beanCasted = (LoginRequestBean) requestBean;
		LoginResponseBean responseBean = new LoginResponseBean();
		responseBean.isOk = ExisteLoginBO.listaLogin.contains(beanCasted.loginName);
		if (!responseBean.isOk) {
			ExisteLoginBO.listaLogin.add(beanCasted.loginName);
		}
		return responseBean;
	}
}
